﻿using System;
using System.Data;
using System.Collections.Generic;
using YXShop.Model.SystemInfo;
using YXShop.DALFactory;
using YXShop.IDAL.SystemInfo;
namespace YXShop.BLL.SystemInfo
{
    /// <summary>
    /// 业务逻辑类MouldInfo 的摘要说明。
    /// </summary>
    public class MouldInfo
    {
        private readonly IMouldInfo dal = DataAccess.CreateMouldInfo();
        public MouldInfo()
        { }
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int Id)
        {
            return dal.Exists(Id);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(YXShop.Model.SystemInfo.MouldInfo model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(YXShop.Model.SystemInfo.MouldInfo model)
        {
            dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public void Delete(int Id)
        {

            dal.Delete(Id);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public YXShop.Model.SystemInfo.MouldInfo GetModel(int Id)
        {

            return dal.GetModel(Id);
        }

        
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public string GetList()
        {
            return dal.GetList();
        }
        /// <summary>
        /// 跟据模型名称查询
        /// </summary>
        /// <param name="Name"></param>
        /// <returns></returns>
        public YXShop.Model.SystemInfo.MouldInfo GetModelName(string Name)
        {
            return dal.GetModelName(Name);
        }

        public System.Data.DataTable GetTypeList(string TypeId)
        {
            return dal.GetTypeList(TypeId);
        }
        #endregion  成员方法
    }
}

